<?php

namespace Album;

use Album\Model\AlbumTable;
use Zend\Config;
use Bike\Module\ModuleAbstract;

/**
 *
 * @author d.mas
 *
 */
class Module extends ModuleAbstract
{
	public function getAutoloaderConfig()
	{
		return array(
			'Zend\Loader\ClassMapAutoloader' => array(
				__DIR__.'/autoload_classmap.php'
			),
			'Zend\Loader\StandardAutoloader' => array(
				'namespaces' => array(
					__NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__,
				),
			),
		);
	}
	public function getConfig()
	{
		return $this->prepareConfig(__DIR__.'/config/module.ini');
	}

	public function getServiceConfig()
	{
		return array(
			'factories' => array(
				'Album\Model\AlbumTable' =>  function($sm) {
					$dbAdapter = $sm->get('Zend\Db\Adapter\Adapter');
					$table     = new AlbumTable($dbAdapter);
					return $table;
				},
			),
		);
	}

}

?>